<?php
namespace Common\Models;
use Common\BaseModel;
class Operator extends BaseModel
{
	public $res;
	public $expire;
	public function getSource()
    {
        return "f_operator";
    }

    /**
     * 根据等级获取列表
     */
    public function get_list($cate_id){
        $conditions = "oper_cateid={$cate_id}";
	    $res = $this->find(
	        array(
                $conditions,
                'order'=>'sort desc,id asc',
            )
        )->toarray();
	    $material = new Material();
	    foreach($res as $key=>$value){
            $res[$key]['router']=$material->getListByIds($value['ids']);
        }
        return $res;
    }

}
